<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="{%$URL%}style/webstyle.css" rel="stylesheet" type="text/css" />
<title>{%$web_name%}</title>
<script type="text/javascript">
function newgdcode(obj,url) {
  obj.src = url+ '&nowtime=' + new Date().getTime();//后面传递一个随机参数，否则在IE7和火狐下，不刷新图片
}
// 表单提交客户端检测
function Isyx(yx){
  var reyx= /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
  return(reyx.test(yx));
  }
function doSubmit(){
  var Rname=document.getElementById("Rlc_name");
  var Rtel=document.getElementById("Rlc_tel");
  var Remail=document.getElementById("Rlc_email");
  var Rtitle=document.getElementById("Rlc_title");
  var Rcontent=document.getElementById("Rlc_content");
  var Ryzm=document.getElementById("Ryzm");
    if (document.myform.lc_name.value==""){
        Rname.innerHTML="亲，请写姓名！";
    Rname.style.color="red";
        document.myform.lc_name.focus();
        return false;
    }
    
    if (document.myform.lc_name.value.length>5||document.myform.lc_name.value.length<1 ){
        Rname.innerHTML="亲,您输入的姓名必须在1~5个字之间！";
    Rname.style.color="red";
        document.myform.lc_name.focus();
        return false;
    }
    var reg =/(^0{0,1}1[3|4|5|6|7|8|9][0-9]{9}$)/; 
    if (document.myform.lc_tel.value==""){
        Rtel.innerHTML="亲，请写电话！";
    Rtel.style.color="red";
        document.myform.lc_tel.focus();
        return false;
    }
    if(!reg.test(document.myform.lc_tel.value)){ 
        Rtel.innerHTML="亲，请输入正确的电话！";
    Rtel.style.color="red";
        document.myform.lc_tel.focus();
        return false; 
     }
    
    if (document.myform.lc_email.value==""){
        Remail.innerHTML="亲，请写邮箱！";
    Remail.style.color="red";
        document.myform.lc_email.focus();
        return false;
    }
    if (!Isyx(document.myform.lc_email.value)){
     Remail.innerHTML="亲，请输入正确的邮箱地址！";
     Remail.style.color="red";
     document.myform.lc_email.value="";
     document.myform.lc_email.focus();
     return false;
     }
     
    if (document.myform.lc_title.value==""){
        Rtitle.innerHTML="亲，请填写您留言的标题！";
    Rtitle.style.color="red";
        document.myform.lc_title.focus();
        return false;
    }
    if (document.myform.lc_content.value==""){
        Rcontent.innerHTML="亲，请填写您的留言内容！";
    Rcontent.style.color="red";
        document.myform.lc_content.focus();
        return false;
    }
    if (document.myform.yzm.value==""){
        Ryzm.innerHTML="亲，请填写验证码！";
    Ryzm.style.color="red";
        document.myform.yzm.focus();
        return false;
    }
}
//数据填写验证
function check_name(obj){
  //验证 姓名
  var name=obj.value;
  var Rname=document.getElementById("Rlc_name");
  if(name){
    if(name.length>5 || name.length<1){
      Rname.innerHTML="亲,您输入的姓名必须在1~5个字之间！";
      Rname.style.color="red";
      }else{
        Rname.innerHTML="正确";
        Rname.style.color="green";
        }
    }else{
      Rname.innerHTML="亲，请写姓名！";
      Rname.style.color="red";
      }
  }
function check_tel(obj){
  //验证 电话
  var tel=obj.value;
  var Rtel=document.getElementById("Rlc_tel");
  if(tel){
    var reg =/(^0{0,1}1[3|4|5|6|7|8|9][0-9]{9}$)/;
    if(!reg.test(tel)){
      Rtel.innerHTML="亲，请输入正确的电话！";
      Rtel.style.color="red";
      }else{
        Rtel.innerHTML="正确";
        Rtel.style.color="green";
        }
    }else{
      Rtel.innerHTML="亲，请写电话！";
      Rtel.style.color="red";
      }
  }
function check_email(obj){
  //验证 邮箱
  var email=obj.value;
  var Remail=document.getElementById("Rlc_email");
  if(email){
    if(!Isyx(email)){
      Remail.innerHTML="亲，请输入正确的邮箱地址！";
      Remail.style.color="red";
      }else{
        Remail.innerHTML="正确";
        Remail.style.color="green";
        }
    }else{
      Remail.innerHTML="亲，请写邮箱！";
      Remail.style.color="red";
      }
  }
function check_title(obj){
  //验证 标题
  var title=obj.value;
  var Rtitle=document.getElementById("Rlc_title");
  if(title){
    Rtitle.innerHTML="正确";
    Rtitle.style.color="green";
    }else{
      Rtitle.innerHTML="亲，请填写您留言的标题！";
      Rtitle.style.color="red";
      }
  }
function check_content(obj){
  //验证 内容
  var content=obj.value;
  var Rcontent=document.getElementById("Rlc_content");
  if(content){
    Rcontent.innerHTML="正确";
    Rcontent.style.color="green";
    }else{
      Rcontent.innerHTML="亲，请填写您的留言内容！";
      Rcontent.style.color="red";
      }
  }
</script>
</head>
<body>
  <!--头部 开始-->
{%include file='head.htm'%}
<!--头部 结束--> 
<!--内容 开始-->
<div class="nr" style="padding:0 0 40px 0;">
  <div class="main_title"> <span class="main_t">留言列表</span><br>
    <!-- Wonderful Case  --></div>
  <div style="padding:40px 0 0 0;">
    <div class="main_l">
      <div class="main_l_title"><span style="font-size:22px;">栏目分类</span><br>
        <!-- Wonderful case --></div>
      <div class="main_l_list">
        <ul>
          <li><a href="index.php?p=gbook&lanmu={%$smarty.get.lanmu%}">留言板</a></li>
          <li><a href="index.php?p=gbook_list&lanmu={%$smarty.get.lanmu%}">留言列表</a></li>
        </ul>
      </div>
    </div>
    <div style="float:left; width:900px; margin-left:10px;">
      <ul>
        {%lcmx_gbook_list set="列表名:gbook,显示数目:5,分页显示:1,栏目:GET[lanmu]"%}
        {%if $gbook%}
        {%foreach from=$gbook item=list%}
        <table width="95%" border="0" cellspacing="1" cellpadding="3" bgcolor="#dddddd" style="margin-left:20px;">
          <tr bgcolor="#eeeeee" height="40px;">
            <td height="22" width="90" align="right">&nbsp;标题：</td>
            <td>&nbsp;{%$list.lc_title%}</td>
            <td width="45%">&nbsp;留言时间：{%$list.lc_datetime|date_format:"%Y-%m-%d"%}</td>
          </tr>
          <tr bgcolor="#eeeeee" height="40px;">
            <td height="22" width="90" align="right">&nbsp;留 言 者：</td>
            <td>&nbsp;{%$list.lc_name%}</td>
            <td width="45%">&nbsp;IP：{%$list.lc_ip%}</td>
          </tr>
          <tr bgcolor="#eeeeee" height="40px;">
            <td height="22" align="right">&nbsp;留言内容：</td>
            <td colspan="2">&nbsp;{%$list.lc_content%}</td>
          </tr>
          <tr bgcolor="#eeeeee" height="40px;">
            <td height="22" align="right">&nbsp;留言回复：</td>
            <td colspan="2">&nbsp; {%if $list.lc_reply==""%} <font
        color="#FF0000">暂无回复！</font> {%else%} <font color="#009900">{%$list.lc_reply%}</font> {%/if%}</td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td style="height: 5px"></td>
          </tr>
        </table>
        {%/foreach%}
        {%else%} 暂无留言！ {%/if%}
      </ul>
      <div class="main_page" id="page" style="margin-bottom:10px;"><ul>{%$page%}</ul></div>
  </div>
</div>
    <!-- right -->
    <div class="clear"></div>
  </div>
  {%include file="bot.htm"%}</div>
<!-- body --> 
<br>
<br>
</body>
</html>
